<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<!--1 for in 循环 用来遍历对象的属性或数组中的元素，并且对每个对象执行运算-->
		<script>
			// 遍历myObject对象
			var myObject={
				hisName:"ss",
				age:11,
				
			}
			for(var prop in myObject){
				document.write(prop+":"+myObject[prop]);
				document.write("<br />");
				
			}
			
			// 遍历数组
			var myArray=new Array("one","two","three");
			for(var index in myArray){
				document.write(myArray[index]);
				document.write("<br />");
			}
			
		</script>	
			
	</body>
</html>
